package com.myqm.controller.weixin;

import java.util.List;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.github.pagehelper.PageInfo;
import com.myqm.dto.ResultResponse;
import com.myqm.pojo.weixin.Internaltrade;
import com.myqm.pojo.weixin.query.QueryInternaltrade;
import com.myqm.service.weixin.InternaltradeService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@Api(tags = "商品信息查询")
@RestController
@RequestMapping(value="/trade")
public class InternalTradeController { 
	@Autowired
	public InternaltradeService internaltradeservice; 
	
	@ApiOperation(value = "详细列表查询") 
	@PostMapping(value = "/list")
	public ResultResponse<PageInfo<Internaltrade>>  list
	( @ApiParam(required = false, value = "查询参数")
	@Valid @RequestBody QueryInternaltrade param) {
	 return new ResultResponse<PageInfo<Internaltrade>>
			 (internaltradeservice.list(param.getPageNum(), param.getPageSize(),param));
	} 
}
